Hi,
I override the drawTickMarks() in NSSliderCell.
However, I need to draw some text there and may have a little outside the NSSlider's boundary, so I got some clip in my result.
I try to set the maskToBound to false by
self.controlView?.wantsLayer = true
self.controlView?.layer?.masksToBounds = false
self.controlView?.layer?.backgroundColor = CGColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 0.5)
So I can clearly see the bounds of slider but the masksToBounds didn't work here.
Does anybody know to make the masksToBounds work for my purpose?
Thank you~~
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,Is it possible to watch the WWDC developer video in Apple TV directly, currently, I need to download to watch the video, it's a little in-convenient.Does anybody know how to do it?
Hi,I got the gs_instruments.dls from the sample code. But I can't find any information about this file like the program 10 represent which instrument, note 60 represent which note, ..., etc.Does anybody know where can I find these information about this file?Thank you~~ Really thank anybody can give some idea about these issues.regards,Eric
Hi,
I am not sure about the real reason of my case, when I use NSWindow of my window's base class, the options
(Zoom, Move Window to Left Side of Screen, Move Window to Right Side of Screen, ... etc) that when I hover on the resize button are disabled.
But when I change my window's base class to NSPanel,
these options are enabled.
What I want is disabling all options in the option menu and keeping zoom function only on the resize button.
Are there some attribute that I can set to disable these options?
Thank you~~
Eric
Hi I am using the NSCollectionView to provide the media preview & selection for user. I found the iPhoto application can highlight (with blue border) the selected photo that inside the selection rectangle when I drag mouse ( Didn't go mouse up state yet.)
But I can't find the delegate in NSCollectionViewDelegate can help me to implement this feature?
Are there any method I can use to implement this feature?
I found the delegate shouldChangeItemsAt is called during mouse dragging but the index array is empty?
Can I use some setting to make it give me the selected item's array?
Thanks
Eric
Hi,
I am trying to build ffmpeg for Intel and M1 platform for my application.
I got some problem, because when I put arm64 dylibs I got error that no x86_64 dylibs available. And I got arm64 dylibs not available when I put x86_64 dylibs.
Can I combine these two set of dylibs into a single one then I don't need to change the dylibs on different platform?
XCFramework or ??
Thank you.
Eric
I have porting my existing application to support native M1, there a a lot of framework and library that I have already build for both platform.
The strange result is when I archive the app on Intel machine. The binary work on Intel platform well. When I archive my application on M1 machine, the app can work on M1 well.
But when I try to run app that build on M1 on Intel Machine, then I got the message said my app is damaged and can't be opened. The same situation got for build in Intel platform one.
I try "lipo -archs" command on my app and I did get
"x86_64 arm64" as result, so my app should already a universal app I guess.
Does any body know are there some way to check what happened on my application?
Thanks, any opinion will be appreciated !
Eric
My code was lived well recently. But today after I update my Xcode 13.1.( It ask me to install some components and I always click yes.)
Then all code related to core graphic like this can't work now. Not only the code but also the constant like: kCGImagePropertyExifFlash is failed to be recognized too.
Does anybody know what happened?
// Write Image
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGContextRef bitmapContext = CGBitmapContextCreate(
pBuffer,
imgInfo.nWidth,
imgInfo.nHeight,
8, // bitsPerComponent
4*imgInfo.nWidth, // bytesPerRow
colorSpace,
kCGImageAlphaNoneSkipLast);
I met a strange issue. I got error:
dyld: Library not loaded: /usr/local/lib/mylib.dylib
Reference from: .....
Reason: image not found
I didn't suppose that I need to load library from /usr/local/lib, because it already included in my project.
The lib is an embed lib of my project and this issue only happened on my M1 mini? I have try three devices even on MacOS 12.0.1
Then I found the "Runpath Search Paths" seems didn't work on M1 machine. All setting among three machine are the same. (The same source code). Even I use the absolute path on this setting on M1 machine didn't work while others two machine without any problem.
Does anybody know what happened?
Should I add additional setting on my M1 machine?
ps: My project has two level, the problem happen on my second level project which is included in the first level project. I am not sure related to this or not?
Hi,
I am trying the speech recognition API.
For live recognition, I use
SFSpeechAudioBufferRecognitionRequest
It works fine in general.
But when I try to use file recognition with
SFSpeechAudioBufferRecognitionRequest
I found that I can't find a way to cancel the recognition?
Cancel or kill the request can't stop the call back from result handler. So I need to wait the recognition finish when I receive the result's isFinal flag is true. It make me a little inconvenient if I try to recognize a long audio file and finally decide to cancel the recognition.
Are there some ways to cancel the file recognition directly?
Thank you~~
Eric